package com.lipaluma.xml.adaptor;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import com.lipaluma.field.adaptor.Adaptor;
import com.lipaluma.field.adaptor.impl.StringReplaceAdaptor;

@XmlRootElement(name=XmlStringReplaceAdaptor.REPLACE)
@XmlAccessorType(XmlAccessType.FIELD)
public class XmlStringReplaceAdaptor implements XmlAdaptor {
	public static final String REPLACE = "replace";
	
	@XmlAttribute(required=true)
	private String find;
	@XmlAttribute(required=true)
	private String replace;
	
	@Override
	public Class<? extends Adaptor> with() {
		return StringReplaceAdaptor.class;
	}

	public String getFind() {
		return find;
	}
	
	public String getReplace() {
		return replace;
	}
}
